home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / osr5 / sco / scripts / admin / mk_hexkeys < prev    next >
Encoding:
AWK Script  |  1997-08-26  |  1.2 KB  |  28 lines

  1. #!/usr/bin/awk -f
  2. # @(#) mk_hexkeys.awk 1.0 91/10/14
  3. # 91/06/25 john h. dubois iii
  4.  
  5. # This program produces as its output a mapchan file which lets you configure
  6. # any tty (console/serial/whatever) to translate the sequence
  7. # control-B x x
  8. # where x is a hex-char 0-9a-f into the character whose 8-bit value is xx.
  9. # Because you can only map 255 compose-key/dead-key sequences, it only works
  10. # with the hex chars given in lower case.  Also, ^B00 is not mapped because you
  11. # cannot map to a null char.  I mapped hex sequences rather than decimal
  12. # sequences because you can only have one compose character and it can only be
  13. # followed by 2 characters.  Change the "2" after compose to some other value
  14. # to set the compose character to something other than ^B.  Note that this uses
  15. # up the compose character/dead key mapping space, so if you are currently
  16. # using mapchan for input with a compose character or dead key you cannot use
  17. # this unless you reduce the number of sequences mapped.  You might change the
  18. # loop to
  19. # (i = 128; ...
  20. # to only map the high-bit characters.
  21.  
  22. BEGIN { 
  23.     print("input\ncompose 2")
  24.     for (i = 1; i < 256; i++)
  25.     printf("'%x' '%x' 0x%x\n",i / 16,i % 16,i)
  26.     print("output")
  27. }
  28.